#pragma once

#include "ReDir.h"

#undef MPLAYER_API

#ifdef MPLAYER_EXPORTS
#define MPLAYER_API __declspec(dllexport)
#else
#define MPLAYER_API __declspec(dllimport)
#endif

struct MEDIA_FORMAT
{
	int		nWidth;
	int		nHeight;
	int		nFramePerSecond;
	int		nEncode;
};

class IMediaList
{
public:
	virtual	void	SetPreviewWindow(HWND	hWnd) = 0;
	virtual	void	SetOutputFormat(MEDIA_FORMAT	format) = 0;
	virtual	void	SetMediaFile(LPCWSTR	lpFileName) = 0;
	virtual char    *GetFilename() = 0;
	virtual	void	OutputFile(LPCWSTR	lpFileName) = 0;

	virtual	void	OnPlay() = 0;
	virtual	void	OnStop() = 0;
	virtual	void	OnPause() = 0;
	virtual	void	OnPrevious() = 0;
	virtual	void	OnNext() = 0;
	virtual	void	OnSound() = 0;
};
MPLAYER_API IMediaList*	GetMediaList();

class IDisplayInterface
{
public:
	virtual	void	SetPreviewWindow(HWND	hWnd) = 0;
	virtual	void	SetMediaFile(LPCWSTR	lpFileName, POSITION pos) = 0;
	virtual char    *GetFilename() = 0;

	virtual	int		GetStatus() = 0;
	virtual	void	OnPlay() = 0;
	virtual	void	OnStop() = 0;
	virtual	void	OnPause() = 0;
	virtual	void	OnPrevious() = 0;
	virtual	void	OnNext() = 0;
	virtual	void	OnSound() = 0;
	virtual	void	Release() = 0;

	virtual int		OnSeek(int ) = 0;
	virtual float	GetProgress() = 0;
	virtual int IsPlay() const = 0;
};
MPLAYER_API IDisplayInterface*	GetDisplayInterface();


class IConvertInterfce
{
public:
//	IConvertInterfce():m_MencOptsPtr(NULL) {}

	virtual	void	Initialize() = 0;
	virtual	void	AddSourceFile(LPCWSTR	lpFileName) = 0;

	virtual	void	SetOutputFormat(LPCWSTR	lpFormat) = 0;
	virtual	void	OutputFile(LPCWSTR	lpFileName) = 0;
	virtual void	set_MencoderOpts(void *ptr) = 0;
	virtual	BOOL	IsConvertFinish() = 0;
};
MPLAYER_API IConvertInterfce*	GetConvertInterfce();
